/**
 * @author Hoang
 */
function UserModel() {
	this.parent();
}

UserModel.inherits(BaseModel, {

});

var User = function(users) {
	this.users = users;
}
function createStaffModel(user) {
	var staff = user.getElementsByTagName("User");
	var arrStaff = [];
	var staffId;
	var staffUsername;
	var staffLName;
	var staffFName;
	var staffAvatar;
	var staffPhone;
	var staffAddress;
	var staffRole;
	var staffIsBan;

	for (var i = 0; i < staff.length; i++) {
		staffId = staff[i].getAttribute("userId");
		staffRole = staff[i].getAttribute("role");
		staffUsername = staff[i].getElementsByTagName("userName")[0].childNodes[0].nodeValue;
		staffLName = staff[i].getElementsByTagName("lastName")[0].childNodes[0].nodeValue;
		staffFName = staff[i].getElementsByTagName("firstName")[0].childNodes[0].nodeValue;
		staffAvatar = staff[i].getElementsByTagName("avatar")[0].childNodes[0].nodeValue;
		staffPhone = staff[i].getElementsByTagName("phone")[0].childNodes[0].nodeValue;
		staffAddress = staff[i].getElementsByTagName("address")[0].childNodes[0].nodeValue;
		staffIsBan = staff[i].getElementsByTagName("isBanned")[0].childNodes[0].nodeValue;
		staffEmail = staff[i].getElementsByTagName("email")[0].childNodes[0].nodeValue;
		arrStaff[i] = {
			"staffId" : staffId,
			"staffRole" : staffRole,
			"staffUsername" : staffUsername,
			"staffLName" : staffLName,
			"staffFName" : staffFName,
			"staffAvatar" : staffAvatar,
			"staffPhone" : staffPhone,
			"staffAddress" : staffAddress,
			"staffIsBan" : staffIsBan,
			"staffEmail" : staffEmail
		}
	}

	return new User(arrStaff);
}